package util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
	private static DateUtil instance;
	private DateUtil(){}
	
	public static DateUtil getInstance(){
		if(instance==null){
			instance = new DateUtil();
		}
		return instance;
	}
	
	public Long getCurrentTimeLong(){
		return new Date().getTime();
	}
	
	public String getCurrentTimeString(){
		Date date = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return sdf.format(date);
	}
}
